define(['jquery'], function($) {
  function newCanvas(env) {
    env = env || { width: 800, height: 600 };
    return $('<canvas id="canvas" width="' + env.width + '" height="' + env.height + '"></canvas>');
  }
  
  function addExtraTitle(title) {
    var $subLiA = window.$env.$subLi.children('a');
    var $subTitle = $subLiA.children('.sub-title');
    if ($subTitle.length === 0) {
      $subTitle = $('<span class="sub-title"></span>');
      $subLiA.append($subTitle);
    }
    $subTitle.text(` - ${title}`);
  }

  return {
    newCanvas: newCanvas,
    addExtraTitle
  }
})